<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2019/11/5
  Time: 23:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>学生选课管理系统</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <style type="text/css">
        *{
            margin:0;
            padding:0;
        }
        body{
            opacity: 0.7
        }
        .div{
            margin-top:30px;
            width:100%;
            font-size:20px;
            text-align:center
        }
        .title{
            width: 100%;
            height: 50px;
            line-height: 80px;
            text-align: center;
            font-size: 30px;
            font-family: kaiti
        }
    </style>
</head>
<body>
<div style="width:805px;height: 700px; margin: 0 auto">
    <div class="title">
        <a href="../jsp/addAdi.jsp"><button style="float: left;margin-top: 30px;" class="btn btn-info">添加</button></a>
        <form action="/admin/adiFind">
            <input type="text" name="admin" style="height:30px;width: 100px;position: relative;left: 190px" autocomplete="off">
            <button class="btn btn-info" style="position: relative;left: 190px">搜索</button>
        </form>
    </div>
    <div>
        <div class="div">
            <p>管理员信息管理系统</p>
            <table class="table table-striped">
                <thead style="background-color: #87CEFA;opacity: 0.9">
                <tr>
                    <th>姓名</th>
                    <th>账号</th>
                    <th>密码</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="data" items="${admin}" >
                    <tr>
                        <td>${data.adi_name}</td>
                        <td>${data.adi_account}</td>
                        <td>${data.adi_password}</td>
                        <td>
                            <a href="updateAdi?id=${data.id}"><button class="btn btn_info">更改</button></a>
                            <a href="deleteId?id=${data.id}"><button class="btn btn_info">开除</button></a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>

        </div>
    </div>
</div>
</body>
<script>

    window.onload=function () {
        var msg=${msg};
        if(msg==1){
            alert("该管理员不存在");
        }
    }
</script>
</html>

